package com.it.mapper;

import com.it.bean.Menu;
import com.it.dto.MenuDTO;
import com.it.vo.MenuVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.additional.insert.InsertListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface MenuMapper extends Mapper<Menu>, InsertListMapper<Menu> {
    List<MenuVo> selectTree(MenuDTO queryBody);

    List<Menu> selectTreeOption(@Param("menu") Menu menu);

    List<MenuVo> tree();

    List<Menu> nodes();

    List<Menu> underlings(Long id);

    List<MenuVo> permissions(@Param("roleIds") List<Long> roleIds, @Param("menuIds") List<Long> menuIds);

    List<Menu> selectForRoles(@Param("roleIds") List<Long> roleIds);
}
